如果我已经完全替换了状态的一部分,我是否仍然需要使用Object.assign或扩展运算符来复制原始状态并将其替换为新状态,或者我可以直接返回我的reducer中的新状态?constfetching=(state={isFetching:false},action)=>{switch(action.type){case'REQUESTING':returnObject.assign({},state,{isFetching:true})case'RECEIVE_POKEMON_TYPE_INFO':returnObject.assign({},state,{isFetching:fal
我想拼接值为3的线[3,"John",90909090]data.json{"headers":[[{"text":"Code","class":"Code"},{"text":"Code","class":"Code"}]],"rows":[[0,"Peter",51123123],[3,"John",90909090],[5,"Mary",51123123]],"config":[[0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"other":[[13,0]]}我试试这个:varsize=data.rows.length